From 26c829aa89c7686c0fb591429c654837e1606d40 Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Fri, 31 Mar 2006 00:09:42 +0100 Subject: [PATCH] Don't use abbreviated ip subcommands -- these are not accepted by iproute2. Closes bug #478. Signed-off-by: Ewan Mellor --- tools/examples/README.incompatibilities | 7 +++++++ tools/examples/vif-route | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/examples/README.incompatibilities b/tools/examples/README.incompatibilities index 87b2dbd62e..bb067bd419 100644 --- a/tools/examples/README.incompatibilities +++ b/tools/examples/README.incompatibilities @@ -24,6 +24,13 @@ Gentoo doesn't have ifup/ifdown; appropriate alternatives are defined in xen-network-common.sh. +ip +-- + +Newer ip commands (from iproute2) do not accept the abbreviated syntax "ip r a +..." etc. "ip route add ..." must be used instead. + + sed --- diff --git a/tools/examples/vif-route b/tools/examples/vif-route index d733119d30..1d5d299b60 100755 --- a/tools/examples/vif-route +++ b/tools/examples/vif-route @@ -29,11 +29,11 @@ case "$command" in online) ifconfig ${vif} ${main_ip} netmask 255.255.255.255 up echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp - ipcmd='a' + ipcmd='add' ;; offline) ifdown ${vif} - ipcmd='d' + ipcmd='del' ;; esac @@ -41,7 +41,7 @@ if [ "${ip}" ] ; then # If we've been given a list of IP addresses, then add routes from dom0 to # the guest using those addresses. for addr in ${ip} ; do - ip r ${ipcmd} ${addr} dev ${vif} src ${main_ip} + ip route ${ipcmd} ${addr} dev ${vif} src ${main_ip} done fi -- 2.30.2